﻿// P220201A_Lijing_Calib_0_Dlg.cpp: 实现文件
//

#include "pch.h"
#include "SakerProject.h"
#include "P220201A_Lijing_Calib_0_Dlg.h"
#include "afxdialogex.h"

#include "CurProject.h"

#include "xxFileProcess.h"
#include "xxWidgetControl.h"

#include "mmFile_Paras.h"

// CP220201A_Lijing_Calib_0_Dlg 对话框
CP220201A_Lijing_Calib_0_Dlg* m_P220201A_Lijing_Calib_0;

IMPLEMENT_DYNAMIC(CP220201A_Lijing_Calib_0_Dlg, CDialogEx)

CP220201A_Lijing_Calib_0_Dlg::CP220201A_Lijing_Calib_0_Dlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_P220201A_Lijing_Calib_0, pParent)
{

}

CP220201A_Lijing_Calib_0_Dlg::~CP220201A_Lijing_Calib_0_Dlg()
{
}

void CP220201A_Lijing_Calib_0_Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CP220201A_Lijing_Calib_0_Dlg, CDialogEx)
	ON_BN_CLICKED(IDC_BUTTON_Save, &CP220201A_Lijing_Calib_0_Dlg::OnBnClickedButtonSave)
END_MESSAGE_MAP()


// CP220201A_Lijing_Calib_0_Dlg 消息处理程序


void CP220201A_Lijing_Calib_0_Dlg::OnBnClickedButtonSave()
{
	CurProject.snLen = xx::DefaultWidget(this, IDC_EDIT_SN_LEN, CurProject.iniField, L"snLen", mmFile_Paras.iniModelPath(), 0);
	CurProject.snStartWith = xx::DefaultWidget(this, IDC_EDIT_SN_STARTWITH, CurProject.iniField, L"snStartWith", mmFile_Paras.iniModelPath());
	CurProject.isCheckSN = xx::DefaultCK(this, IDC_CHECK_IS_CHECK_SN, CurProject.iniField, L"isCheckSN", mmFile_Paras.iniModelPath());
}


BOOL CP220201A_Lijing_Calib_0_Dlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	xx::WriteWidget(this, IDC_EDIT_SN_LEN, CurProject.snLen);
	xx::WriteWidget(this, IDC_EDIT_SN_STARTWITH, CurProject.snStartWith);
	xx::WriteCK(this, IDC_CHECK_IS_CHECK_SN, CurProject.isCheckSN);

	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
